 <include file="application/home/view/public/header.html"/>
      <!-- /.aside -->
      <section id="content">
        <section class="vbox">
          <section class="scrollable padder">
             <header class="header bg-light bg-gradient b-b">
            <p>首页</p>
          </header>
          <section class="panel panel-default">
              <header class="panel-heading "> 会员升级 </header>
              <div class="table-responsive">
                <table class="table table-condensed table-hover">
					<thead>
					<tr>
						<th class='tt'>用户名</th>
						<th class='tt'>会员姓名</th>
						<th class='tt'>推荐人</th>
						<th class='tt'>状态</th>
						<th class='tt'>注册时间</th>
						<th class='tt'>等级</th>
						<th class='tt'>操作</th>
					</tr>
					</thead>
					<tbody>
					
	              <tr>
	                <td class='tt'>{$member.account}</td>
	                <td class='tt'>{$member.name}</td>
	                <td class='tt'>{$member.zhuce_name}</td>
	                <td class='tt'><eq name="member.status" value="0">未激活<else/>已激活</eq></td>
	                <td class='tt'>{$member.createTime| date='Y-m-d H:i:s',###}</td>
	                <td class='tt' id="money">
	                	<eq name="member.status" value="0">
	                		未激活
						<else/>
							<select class="form-control" id="level{$member.member_id}" name="level" style="font-size:12px">
					  		<option value="" selected="selected">--请选择--</option>
					  		<foreach name="level" item="vl">
							  		<option value ="{$vl.id}">{$vl.name}</option>
							  	</foreach>	
						</select>
						</eq>

	                </td>
	               
	                <eq name="member.status" value="1">
					<td class='tt' value="123">
					<a class="dropdown-toggle btn btn-xs btn-primary">
						<i onClick="detial('{$member.member_id}')" class="fa fa-long-arrow-up">升级</i>
					</a>
					</td>
					<else/>
					<td>未激活</td>
					</eq>
	              </tr>
					</tbody>
					</table>
              </div>
              <footer class="panel-footer">
                <div class="row">
                  <div class="col-sm-4 hidden-xs">
                  <!--  这里不可以删掉 -->
                  </div>
                  <div class="col-sm-4 text-center"> <small class="text-muted inline m-t-sm m-b-sm"></small> </div>
                  <div class="col-sm-4 text-right text-center-xs">
                    <ul class="pagination pagination-sm m-t-none m-b-none">
                      <li>{$page}</li>
                    </ul>
                  </div>
                </div>
              </footer>
            </section>
          </section>
        </section>
        <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a> </section>
      <aside class="bg-light lter b-l aside-md hide" id="notes">
        <div class="wrapper">Notification</div>
      </aside>
    </section>
  </section>
</section>
<script src="__PUBLIC__/home/js/app.v2.js"></script> <!-- Bootstrap --> <!-- App --> <script src="__PUBLIC__/home/js/charts/easypiechart/jquery.easy-pie-chart.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/sparkline/jquery.sparkline.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.tooltip.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.resize.js" cache="false"></script> <script src="js/charts/flot/jquery.flot.grow.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/bootstrap_calendar.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/sortable/jquery.sortable.js" cache="false"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
</body>
</html>
<script>
//激活
	//function detial(id){
	//	var level = $('#level'+id).val();//选择的等级id
	//	if(level == ''){
	//		layer.msg('请选择等级');
	//		return;
	//	}
	//	window.location.href="detial.html?member_id="+id+" & level="+level;
	//}



	function detial(id){
		var bool = true;
		var level = $('#level'+id).val();//选择的等级id
		if(level == ''){
			layer.msg('请选择等级');
			return;
		}
		var url = "{:U('Baodan/shengji')}";
		if(bool){
			bool = false;
			$.post(url,{'member_id':id,'level':level},function(data){
				if(data.status<0){
					layer.msg(data.info);	
					bool = true;	
				}else{
					layer.msg(data.info);
					setTimeout(function () { 
				       window.location.href="{:U('Member/jiegou')}"
				    }, 2000);
				}
			});
		}
	}
</script>